package com.itheima.pattern.observer.demo;

import java.util.Observable;
import java.util.Observer;
import java.util.Vector;

public class Police implements Observer {
    private String name;

    public Police(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(((Thief)o).getName()+"，我们盯你好久了");
    }
}
